package cn.school.controller.teacher.leaveCount;

import cn.school.common.api.CommonPage;
import cn.school.common.api.CommonResult;
import cn.school.teacher.leaveCount.entity.DeptLeave;
import cn.school.teacher.leaveCount.service.DeptLeaveService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/teacher/leaveCount")
public class leaveController {

    @Resource
    DeptLeaveService deptLeaveService;

    @GetMapping("/deptLeaveList")
    public CommonResult<PageInfo> leaveList(@RequestParam Map<String, Object> params){
        PageInfo page = deptLeaveService.selectLeaveList(params);
        return CommonResult.success(page);
    }
}
